package com.example.tests;

import org.junit.Before;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import ru.esteru.selenium.factory.WebDriverFactory;
import com.example.pages.LoginPage;
import com.example.pages.MyPageFactory;

public class TestBase {

	protected WebDriver driver;
	private String baseUrl;

	@Before
	public void setUp() throws Exception {
		driver = WebDriverFactory.getDriver(DesiredCapabilities.chrome());
		baseUrl = "http://localhost/";
	}

	public LoginPage goToMainPage() {
		driver.get(baseUrl + "/php4dvd/");
		return MyPageFactory.getPage(driver, LoginPage.class);
	}
}
